<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<link href="/static/thinkct/css/basic.css?v=1" rel="stylesheet" type="text/css" /><script language="javascript" src="/static/thinkct/js/jquery.m.js"></script><script language="javascript" src="/static/thinkct/js/layui/layui.js"></script><script language="javascript" src="/static/thinkct/js/common.js?v=1"></script><script language="javascript" src="/static/thinkct/js/member.js?v=1"></script><link href="/static/thinkct/css/member.css?v=1" rel="stylesheet" type="text/css" /><link href="/static/thinkct/js/layui/css/layui.css" rel="stylesheet" type="text/css" />
</head>
<body>
<form name="" class='layui-form' method="post" action=''>
  <div class='bond_steup'>

<ul class='paytype'><b>缴纳方式</b>
<li class='cur'><input name="auto"  lay-filter="auto" {if $sell.bond_auto==-1}checked{/if} type="radio" value="-1" title='手动缴纳'></li>
<li><input name="auto" type="radio" lay-filter="auto" {if $sell.bond_auto==0}checked{/if} value="0" title='自动缴纳（推荐）'></li>
<dl {if $sell.bond_auto!=0}style='display:none;'{/if}>
<strong class='cur'><input name="automoney" lay-filter="automoney" {if $sell.bond_automoney==0}checked{/if} type="radio" value="0" title='基础额度300元'></strong>
<strong><input name="automoney" lay-filter="automoney" {if $sell.bond_automoney=='cus'}checked{/if} type="radio" value="cus" title='自定义额度（需大于基础额度）'>
<span class="cusinput" {if $sell.bond_cmoney=='' && $sell.bond_cmoney==0}style='display:none;'{/if}><div class="layui-input-inline">
<input type="text" name="cmoney" maxlength="8" style='width:60px;margin-bottom:-1px;height:24px;line-height:24px;padding:0 2px;' value="{$sell.bond_cmoney}" class="o_number layui-input" /></div> <div class="layui-inline"> <div class="layui-form-mid layui-word-aux ">元</div></div></span>
</strong>
</dl>
</ul>
<ul class='claimstype'><b>赔付方式</b>
<li class='cur'><input name="method" {if $sell.bond_method==-1}checked{/if} lay-filter="method" type="radio" value="-1" title='保证金余额'></li>
<li><input name="method" type="radio" {if $sell.bond_method==0}checked{/if} lay-filter="method" value="0" title='账户余额（推荐）'></li>
</ul>

<div class='btndiv'><input type="submit" value="确定设置" lay-submit="" class="layui-btn layui-btn-danger"></div>
  </div>
<div class="notes" style='margin-top:0;'>
	<li> <h3>注意事项及说明：</h3></li>

<li><b>1.</b>【<span>缴纳方式</span>】选项解释
  <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;手动缴纳：保证金不足时，需要自己手动缴纳保证金;
  <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;自动缴纳：保证金不足时，若账户中有余额，系统将自动缴纳至所设置的额度为止;<br />
  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 触发自动缴纳的场景：1. 产生消保赔付后 2. 销售获得收入时 3. 操作当前设置后
<li><b>2.</b>【<span>赔付方式</span>】选项解释
  <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;保证金余额：产生【<span>消保理赔</span>】时，先用【<span>保证金余额</span>】进行赔付，不足再用【<span>账户余额</span>】赔付;
  <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;账户余额：产生【<span>消保理赔</span>】时，先用【<span>账户余额</span>】进行赔付，不足再用【<span>保证金余额</span>】赔付;
 </div>
<input type="hidden" value="{:shop_bh()}" name="bh" />
<input type="hidden" value="setup" name="action" />
<input type="hidden" value="{:passkey()}" name="passkey" />
</form>
<script>
layui.use('form', function(){
	var form = layui.form(),index = parent.layer.getFrameIndex(window.name);
	form.on('radio(auto)', function(data){
		$div=$(data.elem).closest('ul').find('dl');
		(data.value==-1)?$div.hide():$div.show();
		 $(data.elem).closest('li').addClass("cur").siblings("li").removeClass("cur"); 
		 parent.layer.iframeAuto(index);
	}); 
	form.on('radio(method)', function(data){
		 $(data.elem).closest('li').addClass("cur").siblings("li").removeClass("cur"); 
	}); 
	form.on('radio(automoney)', function(data){
		(data.value=='cus')?$(".cusinput").show():$(".cusinput").hide();
		  $(data.elem).closest('strong').addClass("cur").siblings("strong").removeClass("cur"); 

	});  
	form.on('submit', function(data) {
		if($("input[name=auto]:checked").val()==0 && $("input[name=automoney]:checked").val()=='cus' && $("input[name=cmoney]").val()<=300){
		layer.tips('自定义额度需大于基础额度 300 元！', 'input[name=cmoney]');$('input[name=cmoney]').focus();return false;
	}
	return true;
	});
    parent.layer.title('保证金设置 - 您当前保证金余额：<font  color="#f00">{$sell.bond}.00</font> 元，账户余额：<font  color="#f60">{$user.money}</font> 元', index);
	parent.layer.iframeAuto(index);
});

</script>
</html>